<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

<TITLE>Switch -TS[m,c,a,p][+,-,1] - save or restore file time
(modification, creation, access, preserve)</TITLE>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY>

<p class="title">Switch <B>-TS[m,c,a,p][+,-,1]</B>
- save or restore file time (modification, creation, access, preserve)<hr></p>

<p>Use -tsm to save the file modification time, -tsc for creation
time and -tsa for last access time. Multiple -ts switches,
such as -tsc -tsa, are allowed. If 'm', 'c' or 'a' are not
specified, all three file times are assumed.</p>

<p>Append '+' to store a file time with maximum possible precision.
The exact value depends on the particular operating system also as
the file system and can be up to 100 nanoseconds in Windows and 1 nanosecond
in Unix systems. Append '1' to set 1 second precision or '-' to not save
a file time, such as -ts- to omit all 3 times. If '+', '-' or '1' are not
present, '+' is assumed, so -ts+ and -ts both save all three high precision
times.</p>

<p>All stored times for same file always have the same precision.
If different precisions are specified, such as -tsm1 -tsc+,
common one is selected.</p>

<p>If -ts switch is not specified, RAR stores the high precision
modification time and omits two other times.</p>

<p>By default WinRAR sets only the modification time for extracted files,
even if archive contains other times. Use -ts or -ts+ when unpacking to
set all three times, -tsc and -tsa to set creation and last access times,
-tsm- or -ts- to set the current system time instead of modification time
stored in archive.</p>

<p>Use -tsp switch to preserve the original last access file time of source
files when archiving. This switch attempts to keep the original last access
time of archiving files, but it does not control which timestamps are to be
stored in archive. It has to be combined with other -ts switches for this
purpose. For example, if we wish to save the last access time to archive
and preserve the last access time of source files, we need to use
-tsa -tsp together. To open some files with -tsp switch, it may be necessary
to run WinRAR as administrator.</p>

<p>It is allowed to combine several modifiers in the same switch,
such as -tscap instead of -tsc -tsa -tsp.</p>

<p>All modes described above are supported only by RAR format.
In ZIP archives the high precision modification time is stored in the same
data structure as creation and last access times. When archiving to ZIP,
all three times are controlled by -ts or -tsm option, while -tsa and -tsc
are ignored. Use -ts or -tsm to save all times in high precision format
(default ZIP mode), specify -ts- or -tsm- to store only the low precision
modification time. When unpacking ZIP archive, -tsm -tsc -tsa switches
can be used individually to control corresponding times just like as 
for RAR format.</p>

<h1><B>Examples</B></h1>

<ol>
  <li> Store all file times with the highest possible precision:</li>
</ol>
<blockquote>
  <p class="sample">WinRAR a -ts backup</p>
</blockquote>
<ol start="2">
  <li> Restore modification and last access time. Switch -tsm is not
required, because RAR sets the modification time by default.
If we wish to restore only the last access time, we should use
-tsm- -tsa switches:</li>
</ol>
<blockquote>
  <p class="sample">WinRAR x -tsa backup</p>
</blockquote>
<ol start="3">
  <li> Store low precision modification and creation time.
Preserve the last access time of source files.</li>
</ol>
<blockquote>
  <p class="sample">WinRAR a -tsm1 -tsc1 -tsp backup</p>
</blockquote>

</BODY>
</HTML>
